<!doctype html>
<html data-theme="light" lang="zh">

<head>
  <meta charset="UTF-8" />
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" href="./src/assets/output.css" />
  <title>sc启动器</title>
</head>

<style>
  body,
  html {
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  p,
  div,
  span,
  button {

    -webkit-user-select: none;
    /* Chrome, Safari, Opera */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* 非前缀版标准 */
  }
</style>

<body>
  <script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
  <div id="app"></div>
  <script type="module" src="/src/main.ts"></script>

  <!-- <script type="text/javascript">
    let isDragging = false;
    let startX, startY;

    new QWebChannel(qt.webChannelTransport, function (channel) {
      windowController = channel.objects.windowController;
    });

    // 拖动窗口的逻辑
    document.getElementById('title-bar').addEventListener('mousedown', function (e) {
      isDragging = true;
      startX = e.screenX;  // 记录鼠标初始位置
      startY = e.screenY;

      // 记录窗口的初始位置
      windowStartX = window.screenX;
      windowStartY = window.screenY;
    });


    document.addEventListener('mouseup', function () {
      isDragging = false;
    });

    document.addEventListener('mousemove', function (e) {
      if (isDragging) {
        let dx = e.screenX - startX;  // 鼠标移动的水平偏移量
        let dy = e.screenY - startY;  // 鼠标移动的垂直偏移量

        // 基于窗口的初始位置进行移动
        windowController.moveWindow(windowStartX + dx, windowStartY + dy);
      }
    });

  </script> -->
</body>

</html>